
/**
 * @Author: 陈瑞鹏
 * @Date:   2023-01-10 11:25:54
 * @Last Modified by:   陈瑞鹏
 * @Last Modified time: 2023-01-10 11:41:28
 */
import { Dictionary } from "../../utils/dictionary";
import emailEntity from "./emailEntity";

export default class emailCtr {

  private static _ins: emailCtr = null;

  public static get ins(): emailCtr {
    if (this._ins == null) {
      this._ins = new emailCtr();
    }
    return this._ins;
  }

  public emailDic: Dictionary<number, emailEntity> = null;

  public initData(data) {
    this.emailDic = new Dictionary();
    let emailEny: emailEntity = null;
    data.forEach(element => {
      emailEny = new emailEntity();
      emailEny.initData(element);
      this.emailDic.set(emailEny.uid, emailEny);
    });
  }
}